/*
 * RevenueSource.java
 *
 * Created on March 15, 2007, 2:01 PM
 *
 */

package edu.byu.isys413.samlam;

/**
 * An abstract class for RevenueSource business objects. Performs all of the same
 * functions of a BusinessObject class, but enforces a unified output for display in a 
 * GUI.
 * @author BrianB
 */
public abstract class RevenueSource extends BusinessObject{
    /**description of RevenueSource object*/
    protected String description;
    /**price of RevenueSource object*/
    protected double price;
    
    private String transactionLineId;
    private String type;
    
    /** 
     * Creates a new instance of RevenueSource
     * @param id GUID for RevenueSource
     */
    public RevenueSource(String id) {
        super(id);
    }

    /**
     * retrieves price
     * @return RevenueSource's price
     */
    public double getPrice() {
        return price;
    }

    /**
     * sets the price
     * @param price the price of the RevenueSource
     */
    public void setPrice(double price) {
        this.price = price;
        this.setDirty(true);
    }

    /**
     * An abstract method that must be implemented when extending
     * RevenueSource
     * @return the RevenueSource object's description
     */
    public abstract String getDescription();    

    /**
     *Sets the description of the revenue source
     *@param description a String representing the description
     */
    public void setDescription(String description){
        this.description = description;
        this.setDirty(true);
    }
    
    /**
     *retrives the type of revenue source
     *@return the type of revenue source
     */
    public String getType() {
        return type;
    }

    /**
     *Sets the type of revenue source
     *@param type the type of revenue source
     */
    public void setType(String type) {
        this.type = type;
        this.setDirty(true);
    }

    /**
     *gets the transactionLine id from the transaction
     *@return the transactionline id
     */
    public String getTransactionLineId() {
        return transactionLineId;
    }

    /**
     *Sets the transactionLine id
     *@param transactionLineId the transaction line id
     */ 
    public void setTransactionLineId(String transactionLineId) {
        this.transactionLineId = transactionLineId;
        this.setDirty(true);
    }
}
